#!/bin/bash
NUM="3"
while getopts i: c
do
	case $c in
		i)	NUM=$OPTARG;;
	esac
done

shift `expr $OPTIND - 1`

cat $1 | 
	sed 's/^[ 	]*\(.*\)/\1/' |
	sed 's/[ 	]\+$//'|
	nawk  -f awkSepLines |
	sed 's/^[ 	]*\(.*\)/\1/' |
	sed 's/[ 	]\+$//'|
	gawk -f awkSepBracePretty |
	gawk -f awkLongSplit |
	nawk -v NUM=$NUM -f awkIndent
